package com.dragon.modules.yuegou.model.product;

import com.dragon.modules.yuegou.entity.product.HelpEntity;
import com.dragon.modules.yuegou.enums.product.HelpCheckStatus;
import com.dragon.modules.yuegou.enums.product.HelpMemberRefStatus;
import com.dragon.modules.yuegou.enums.product.HelpReleaseType;
import com.dragon.modules.yuegou.enums.product.HelpStatus;
import com.dragon.modules.yuegou.model.merchant.Merchant;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品助力活动信息表模型类
 * 
 * @author px
 * @date 2019-04-12 08:49:27
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class Help extends HelpEntity {

	@ApiModelProperty("商品名称")
	@Size(max = 50)
	private String skuTitle;

	@ApiModelProperty("库存")
	private Stock stock;

	@ApiModelProperty("创建人")
	private String createUserName;

	@ApiModelProperty("创建人")
	private BigDecimal price;

	@ApiModelProperty("规格属性JSON存储")
	protected String attrs;

	@ApiModelProperty("核销开始时间")
	private LocalDateTime useBeginTime;

	@ApiModelProperty("核销结束时间")
	private LocalDateTime useEndTime;

	@ApiModelProperty("详情")
	private String description;

	@ApiModelProperty("图片详情")
	private String imgDescription;
	
	/** 有效期（审核） 开始时间 */
	private LocalDateTime beginTime;

    /** 有效期（审核） 结束时间 */
	private LocalDateTime endTime;

	@ApiModelProperty("所属商圈")
	private String busdName;

	@ApiModelProperty("是否已关注对应商户：0-未关注；> 0 ：已关注")
	private Integer favoriteStatus;

	@ApiModelProperty("是否已收藏活动：0-未关注；> 0 ：已关注")
	private Integer favoriteHelpStatus;

	/**
	 * 参加该助力活动次数也
	 */
	private Integer joinNum = 0;

	private Boolean hasJoin = false;

	/**
	 * 会员助力活动情况
	 */
	private HelpMemberRef helpMemberRef;

	@ApiModelProperty("[枚举]助力状态：0-进行中-PROCESS、1-待支付-UNPAID、2-未支付-NONPAY、3-已支付-PAID、4-已结束-OVER")
	private HelpMemberRefStatus helpMemberRefStatus;

	@ApiModelProperty("发布或参与的助力ID")
	private String helpMemberRefId;

	private Spu spu;

	private Sku sku;

	@ApiModelProperty("参与数")
	private Integer countNum;

	/**
	 * 倒计时
	 */
	@ApiModelProperty("倒计时，有数据时表示助力成功，且未付款")
	private String letTime;
	/**
	 * 商户名集合
	 */
	@ApiModelProperty("商圈发布的助力活动，核销商户集合")
	private String merchantNames;
	/**
	 * 如果是商户发布的助力活动，则需要加载商户信息
	 */
	@ApiModelProperty("商户发布的助力活动，商户信息")
	private Merchant merchant;


	public LocalDateTime getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(LocalDateTime beginTime) {
		this.beginTime = beginTime;
	}

	public LocalDateTime getEndTime() {
		return endTime;
	}

	public void setEndTime(LocalDateTime endTime) {
		this.endTime = endTime;
	}

	public void setViewBeginTime(LocalDateTime viewBeginTime) {
		this.viewBeginTime = viewBeginTime;
	}

	public void setViewEndTime(LocalDateTime viewEndTime) {
		this.viewEndTime = viewEndTime;
	}

	public String getImgDescription() {
		return imgDescription;
	}

	public void setImgDescription(String imgDescription) {
		this.imgDescription = imgDescription;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}

	public String getAttrs() {
		return attrs;
	}

	public void setAttrs(String attrs) {
		this.attrs = attrs;
	}

	public Stock getStock() {
		return stock;
	}

	public void setStock(Stock stock) {
		this.stock = stock;
	}

	public String getSkuTitle() {
		return skuTitle;
	}

	public void setSkuTitle(String skuTitle) {
		this.skuTitle = skuTitle;
	}


	public Integer getFavoriteHelpStatus() {
		return favoriteHelpStatus;
	}

	public void setFavoriteHelpStatus(Integer favoriteHelpStatus) {
		this.favoriteHelpStatus = favoriteHelpStatus;
	}


	public Integer getCountNum() {
		return countNum;
	}

	public void setCountNum(Integer countNum) {
		this.countNum = countNum;
	}


	public Integer getFavoriteStatus() {
		return favoriteStatus;
	}

	public void setFavoriteStatus(Integer favoriteStatus) {
		this.favoriteStatus = favoriteStatus;
	}

	public String getLetTime() {
		return letTime;
	}

	public void setLetTime(String letTime) {
		this.letTime = letTime;
	}

	public String getMerchantNames() {
		return merchantNames;
	}

	public void setMerchantNames(String merchantNames) {
		this.merchantNames = merchantNames;
	}

	public String getHelpMemberRefId() {
		return helpMemberRefId;
	}

	public void setHelpMemberRefId(String helpMemberRefId) {
		this.helpMemberRefId = helpMemberRefId;
	}

	public HelpMemberRefStatus getHelpMemberRefStatus() {
		return helpMemberRefStatus;
	}

	public void setHelpMemberRefStatus(HelpMemberRefStatus helpMemberRefStatus) {
		this.helpMemberRefStatus = helpMemberRefStatus;
	}

	public Boolean getHasJoin() {
		return hasJoin;
	}

	public void setHasJoin(Boolean hasJoin) {
		this.hasJoin = hasJoin;
	}

	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}

	public Spu getSpu() {
		return spu;
	}

	public void setSpu(Spu spu) {
		this.spu = spu;
	}

	public Sku getSku() {
		return sku;
	}

	public void setSku(Sku sku) {
		this.sku = sku;
	}

	public String getBusdName() {
		return busdName;
	}

	public void setBusdName(String busdName) {
		this.busdName = busdName;
	}

	public HelpMemberRef getHelpMemberRef() {
		return helpMemberRef;
	}

	public void setHelpMemberRef(HelpMemberRef helpMemberRef) {
		this.helpMemberRef = helpMemberRef;
	}

	public Integer getJoinNum() {
		return joinNum;
	}

	public void setJoinNum(Integer joinNum) {
		this.joinNum = joinNum;
	}



	/**
	 * 构造一个空商品助力活动信息表模型对象
	 */
	public Help() {
		super();
	}

	/**
	 * 依据实体对象的信息构造一个商品助力活动信息表模型对象
	 * 
	 * @param entity
	 *            实体对象
	 */
	public Help(HelpEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个商品助力活动信息表模型对象
	 * 
	 * @param other
	 *            其它对象
	 */
	public Help(Help other) {
		super(other);
	}

	@Override
	public String getId() {
		return id;
	}

	/**
	 * 设置
	 * 
	 * @param id
	 * @return 当前对象
	 */
	public Help id(String id) {
		this.id = id;
		return this;
	}

	@Override
	public String getName() {
		return name;
	}

	/**
	 * 设置活动名称
	 * 
	 * @param name
	 *            活动名称
	 * @return 当前对象
	 */
	public Help name(String name) {
		this.name = name;
		return this;
	}

	@Override
	@Size(max = 50)
	public String getBusdId() {
		return busdId;
	}

	/**
	 * 设置商圈ID
	 * 
	 * @param busdId
	 *            商圈ID
	 * @return 当前对象
	 */
	public Help busdId(String busdId) {
		this.busdId = busdId;
		return this;
	}

	@Override
	public String getMerchantId() {
		return merchantId;
	}

	/**
	 * 设置商户ID
	 *
	 * @param merchantId
	 *            商户ID
	 * @return 当前对象
	 */
	public Help merchantId(String merchantId) {
		this.merchantId = merchantId;
		return this;
	}

	@Override
	public HelpReleaseType getReleaseType() {
		return releaseType;
	}

	/**
	 * 设置[枚举]发布类型：0-商圈-BUSD、1-商户-MERCHANT
	 *
	 * @param releaseType
	 *            [枚举]发布类型：0-商圈-BUSD、1-商户-MERCHANT
	 * @return 当前对象
	 */
	public Help releaseType(HelpReleaseType releaseType) {
		this.releaseType = releaseType;
		return this;
	}

	@Override
	public String getSpuId() {
		return spuId;
	}

	/**
	 * 设置
	 * 
	 * @param spuId
	 * @return 当前对象
	 */
	public Help spuId(String spuId) {
		this.spuId = spuId;
		return this;
	}

	@Override
	public String getSkuId() {
		return skuId;
	}

	/**
	 * 设置助力sku
	 * 
	 * @param skuId
	 *            助力sku
	 * @return 当前对象
	 */
	public Help skuId(String skuId) {
		this.skuId = skuId;
		return this;
	}

	@ApiModelProperty("助力活动折扣价")
	@Override
	public BigDecimal getDiscount() {
		return discount;
	}

	/**
	 * 设置助力折扣
	 * 
	 * @param discount
	 *            助力折扣
	 * @return 当前对象
	 */
	public Help discount(BigDecimal discount) {
		this.discount = discount;
		return this;
	}

	@Override
	public Integer getTotal() {
		return total;
	}

	/**
	 * 设置助力数量
	 * 
	 * @param total
	 *            助力数量
	 * @return 当前对象
	 */
	public Help total(Integer total) {
		this.total = total;
		return this;
	}

	@ApiModelProperty("库存")
	@Override
	public Integer getSurplus() {
		return surplus;
	}

	/**
	 * 设置剩余
	 * 
	 * @param surplus
	 *            剩余
	 * @return 当前对象
	 */
	public Help surplus(Integer surplus) {
		this.surplus = surplus;
		return this;
	}

	@Override
	public Integer getMaxBuy() {
		return maxBuy;
	}

	/**
	 * 设置最大购买数量
	 * 
	 * @param maxBuy
	 *            最大购买数量
	 * @return 当前对象
	 */
	public Help maxBuy(Integer maxBuy) {
		this.maxBuy = maxBuy;
		return this;
	}

	@Override
	public Integer getMinPeopleQey() {
		return minPeopleQey;
	}

	/**
	 * 设置助力最小人数
	 * 
	 * @param minPeopleQey
	 *            助力最小人数
	 * @return 当前对象
	 */
	public Help minPeopleQey(Integer minPeopleQey) {
		this.minPeopleQey = minPeopleQey;
		return this;
	}

	@Override
	public Integer getMaxPeopleQey() {
		return maxPeopleQey;
	}

	/**
	 * 设置助力最大人数
	 * 
	 * @param maxPeopleQey
	 *            助力最大人数
	 * @return 当前对象
	 */
	public Help maxPeopleQey(Integer maxPeopleQey) {
		this.maxPeopleQey = maxPeopleQey;
		return this;
	}

	@Override
	public BigDecimal getHelpMaxValue() {
		return helpMaxValue;
	}

	/**
	 * 设置助力最大值
	 * 
	 * @param helpMaxValue
	 *            助力最大值
	 * @return 当前对象
	 */
	public Help helpMaxValue(BigDecimal helpMaxValue) {
		this.helpMaxValue = helpMaxValue;
		return this;
	}

	public LocalDateTime getUseBeginTime() {
		return useBeginTime;
	}

	public void setUseBeginTime(LocalDateTime useBeginTime) {
		this.useBeginTime = useBeginTime;
	}

	public LocalDateTime getUseEndTime() {
		return useEndTime;
	}

	public void setUseEndTime(LocalDateTime useEndTime) {
		this.useEndTime = useEndTime;
	}

	@Override
	public LocalDateTime getViewBeginTime() {
		return viewBeginTime;
	}

	@Override
	public LocalDateTime getViewEndTime() {
		return viewEndTime;
	}

	@Override
	public LocalDateTime getBeginDate() {
		return beginDate;
	}

	/**
	 * 设置开始日期
	 * 
	 * @param beginDate
	 *            开始日期
	 * @return 当前对象
	 */
	public Help beginDate(LocalDateTime beginDate) {
		this.beginDate = beginDate;
		return this;
	}

	@Override
	public LocalDateTime getEndDate() {
		return endDate;
	}

	/**
	 * 设置结束日期
	 * 
	 * @param endDate
	 *            结束日期
	 * @return 当前对象
	 */
	public Help endDate(LocalDateTime endDate) {
		this.endDate = endDate;
		return this;
	}

	@Override
	public HelpStatus getStatus() {
		return status;
	}

	/**
	 * 设置[枚举]活动状态：0-未开始-READY、1-进行中-NORMAL、2-已停止-STOP、2-已过期-EXPIRE
	 * 
	 * @param status
	 *            [枚举]活动状态：0-未开始-READY、1-进行中-NORMAL、2-已停止-STOP、2-已过期-EXPIRE
	 * @return 当前对象
	 */
	public Help status(HelpStatus status) {
		this.status = status;
		return this;
	}

	@Override
	public String getRemarks() {
		return remarks;
	}

	/**
	 * 设置助力规则介绍
	 * 
	 * @param remarks
	 *            助力规则介绍
	 * @return 当前对象
	 */
	public Help remarks(String remarks) {
		this.remarks = remarks;
		return this;
	}

	@Override
	public Integer getSort() {
		return sort;
	}

	/**
	 * 设置排序
	 * 
	 * @param sort
	 *            排序
	 * @return 当前对象
	 */
	public Help sort(Integer sort) {
		this.sort = sort;
		return this;
	}

	@Override
	public String getCreatedBy() {
		return createdBy;
	}

	/**
	 * 设置创建人ID
	 * 
	 * @param createdBy
	 *            创建人ID
	 * @return 当前对象
	 */
	public Help createdBy(String createdBy) {
		this.createdBy = createdBy;
		return this;
	}

	@Override
	public LocalDateTime getCreatedTime() {
		return createdTime;
	}

	/**
	 * 设置创建时间
	 * 
	 * @param createdTime
	 *            创建时间
	 * @return 当前对象
	 */
	public Help createdTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
		return this;
	}

	@Override
	public String getModifiedBy() {
		return modifiedBy;
	}

	/**
	 * 设置更新人ID
	 * 
	 * @param modifiedBy
	 *            更新人ID
	 * @return 当前对象
	 */
	public Help modifiedBy(String modifiedBy) {
		this.modifiedBy = modifiedBy;
		return this;
	}

	@Override
	public LocalDateTime getModifiedTime() {
		return modifiedTime;
	}

	/**
	 * 设置更新时间
	 * 
	 * @param modifiedTime
	 *            更新时间
	 * @return 当前对象
	 */
	public Help modifiedTime(LocalDateTime modifiedTime) {
		this.modifiedTime = modifiedTime;
		return this;
	}

	@Override
	public Boolean getDel() {
		return del;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除
	 * 
	 * @param del
	 *            逻辑删除，1表示已删除,0表示未删除
	 * @return 当前对象
	 */
	public Help del(Boolean del) {
		this.del = del;
		return this;
	}

	@Override
	public String getDelBy() {
		return delBy;
	}

	/**
	 * 设置删除人ID
	 * 
	 * @param delBy
	 *            删除人ID
	 * @return 当前对象
	 */
	public Help delBy(String delBy) {
		this.delBy = delBy;
		return this;
	}

	@Override
	public LocalDateTime getDelTime() {
		return delTime;
	}

	/**
	 * 设置删除时间
	 * 
	 * @param delTime
	 *            删除时间
	 * @return 当前对象
	 */
	public Help delTime(LocalDateTime delTime) {
		this.delTime = delTime;
		return this;
	}

	@Override
	public Boolean getFloorPriceLimit() {
		return floorPriceLimit;
	}

	/**
	 * 设置限底价购买 1:是，0否
	 * 
	 * @param floorPriceLimit
	 *            限底价购买 1:是，0否
	 * @return 当前对象
	 */
	public Help floorPriceLimit(Boolean floorPriceLimit) {
		this.floorPriceLimit = floorPriceLimit;
		return this;
	}

	@Override
	public String getImgs() {
		return imgs;
	}

	/**
	 * 设置活动图片
	 * 
	 * @param imgs
	 *            活动图片
	 * @return 当前对象
	 */
	public Help imgs(String imgs) {
		this.imgs = imgs;
		return this;
	}

	@Override
	public Integer getViews() {
		return views;
	}

	/**
	 * 设置浏览次数
	 * 
	 * @param views
	 *            浏览次数
	 * @return 当前对象
	 */
	public Help views(Integer views) {
		this.views = views;
		return this;
	}

	@Override
	public Integer getShareNum() {
		return shareNum;
	}

	/**
	 * 设置分享次数
	 * 
	 * @param shareNum
	 *            分享次数
	 * @return 当前对象
	 */
	public Help shareNum(Integer shareNum) {
		this.shareNum = shareNum;
		return this;
	}

	@Override
	public Boolean getIsChoiceness() {
		return isChoiceness;
	}

	/**
	 * 设置精选 0 :否；1：是
	 * 
	 * @param isChoiceness
	 *            精选 0 :否；1：是
	 * @return 当前对象
	 */
	public Help isChoiceness(Boolean isChoiceness) {
		this.isChoiceness = isChoiceness;
		return this;
	}

	@Override
	public Integer getIsRecommend() {
		return isRecommend;
	}

	/**
	 * 设置是否推荐 0:不推荐 1:推荐
	 * 
	 * @param isRecommend
	 *            是否推荐 0:不推荐 1:推荐
	 * @return 当前对象
	 */
	public Help isRecommend(Integer isRecommend) {
		this.isRecommend = isRecommend;
		return this;
	}

	@Override
	public Boolean getShowMain() {
		return showMain;
	}

	/**
	 * 设置首页展示0 :否；1：是
	 * 
	 * @param showMain
	 *            首页展示0 :否；1：是
	 * @return 当前对象
	 */
	public Help showMain(Boolean showMain) {
		this.showMain = showMain;
		return this;
	}

	@Override
	public Integer getIsExpire() {
		return isExpire;
	}

	/**
	 * 设置是否过期:0:否 1:是
	 * 
	 * @param isExpire
	 *            是否过期:0:否 1:是
	 * @return 当前对象
	 */
	public Help isExpire(Integer isExpire) {
		this.isExpire = isExpire;
		return this;
	}

	@Override
	public LocalDateTime getCheckTime() {
		return checkTime;
	}

	/**
	 * 设置审核时间
	 * 
	 * @param checkTime
	 *            审核时间
	 * @return 当前对象
	 */
	public Help checkTime(LocalDateTime checkTime) {
		this.checkTime = checkTime;
		return this;
	}

	@Override
	public String getCheckBy() {
		return checkBy;
	}

	/**
	 * 设置审核人
	 * 
	 * @param checkBy
	 *            审核人
	 * @return 当前对象
	 */
	public Help checkBy(String checkBy) {
		this.checkBy = checkBy;
		return this;
	}

	@Override
	public String getCheckReason() {
		return checkReason;
	}

	/**
	 * 设置审核备注
	 * 
	 * @param checkReason
	 *            审核备注
	 * @return 当前对象
	 */
	public Help checkReason(String checkReason) {
		this.checkReason = checkReason;
		return this;
	}

	@Override
	public HelpCheckStatus getCheckStatus() {
		return checkStatus;
	}

	/**
	 * 设置[枚举]审核状态：0-待提交-SUBMIT、1-审核中-CHECKING、2-审核通过-THROUGH、3-审核未通过-NOTHROUGH
	 * 
	 * @param checkStatus
	 *            [枚举]审核状态：0-待提交-SUBMIT、1-审核中-CHECKING、2-审核通过-THROUGH、3-审核未通过-NOTHROUGH
	 * @return 当前对象
	 */
	public Help checkStatus(HelpCheckStatus checkStatus) {
		this.checkStatus = checkStatus;
		return this;
	}
}
